<%-- 
    Document   : AddAlbum
    Created on : Jun 8, 2012, 4:49:33 AM
    Author     : Jaice
--%>


<%@tag description="put the tag description here" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/style.css" />

<script  src="${pageContext.request.contextPath}/js/qaEffect.js"></script>
<script src="${pageContext.request.contextPath}/js/flexiblelist.js"></script>

<%-- The list of normal or fragment attributes can be specified here: --%>

<%@attribute name="album" required="true" type="model.Album"%>
<%-- any content can be specified here e.g.: --%>

<div id="itunewindow" >
    <c:if test="${album eq null}">
        <form method="POST" action="${pageContext.request.contextPath}/AddAlbumController" >

            Album Name :  
            <input name="txtName" type="text"/> 
            <br/>

            Date Released (yyyy-MM-dd):
            <input name="txtDateReleased" type="text"/> 
            <br/>

            Price: 
            <input name="txtPrice" type="text"/> 
            <br/>

            <input type="submit" value="Add" name="btnSubmit"/>
        </form>
    </c:if>

    <c:if test="${album ne null}">
        Editing [${album.albumName}]
        <form method="POST" action="${pageContext.request.contextPath}/AddAlbumController" >

            Album Name :  
            <input name="txtName" type="text" value="${album.albumName}"/> 
            <br/>

            Date Released (yyyy-MM-dd):
            <input name="txtDateReleased" type="text" value="${album.dateReleased}"/> 
            <br/>

            Price: 
            <input name="txtPrice" type="text" value="${album.price}"/> 
            <br/>

            <input type="hidden" name="albumId" value="${album.albumId}"/>

            <input type="submit" value="Update" name="btnSubmit"/>
        </form>
    </c:if>


</div>